<div class="contract-info-container" ng-if="contract">
  <ng-form class="form-horizontal">
    <div class="form-group">
      <h3 class="text-center">合同信息</h3>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">合同号</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.uuid}}</div>
      </div>
      <label class="control-label col-sm-2">合同状态</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.statusName}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">公寓</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.apartmentName}}</div>
      </div>
      <label class="control-label col-sm-2">楼栋</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.buildingName}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">房间号</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.houseNo}}</div>
      </div>
      <label class="control-label col-sm-2">地址</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.address}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2  col-sm-offset-1">签署日期</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.signTime}}</div>
      </div>
      <label class="control-label col-sm-2">退租时间</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.endTime}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">租期</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.leaseName}}</div>
      </div>
      <label class="control-label col-sm-2">付款方式</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.payWayName}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">合同开始日期</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.leaseStart|dateTransfer:'YYYY-MM-DD'}}</div>
      </div>
      <label class="control-label col-sm-2">合同结束日期</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.leaseEnd|dateTransfer:'YYYY-MM-DD'}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">租户姓名</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.customerName}}</div>
      </div>
      <label class="control-label col-sm-2">租户手机号</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.customerPhone}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">租户身份证</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.customerCard}}</div>
      </div>
      <label class="control-label col-sm-2">居住人数</label>
      <div class="col-sm-3">
        <div class="input-group">
          <input type="number" class="form-control" readonly ng-model="contract.cotenants.length"
                 maxlength="4">
          <span class="input-group-addon" ng-click="openCotenant('view',contract.cotenants)">查看</span>
        </div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">月租金</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.originalRental}}</div>
      </div>
      <label class="control-label col-sm-2">押金</label>
      <div class="col-sm-3">
        <!--客户需求租金押金相同，此处传了两个原租金-->
        <div class="form-control info-text">{{contract.originalRental}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">实付租金</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.rental}}</div>
      </div>
      <label class="control-label col-sm-2">实付押金</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.deposit}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">朝向</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.orientationsName}}</div>
      </div>
      <label class="control-label col-sm-2">面积</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.area}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">水费单价</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.waterPrice}}</div>
      </div>
      <label class="control-label col-sm-2">电费单价</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.powerPrice}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">业务员</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.receptionist}}</div>
      </div>
      <label class="control-label col-sm-2">渠道</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.buzTypeName}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">电费余额</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.powerBalance}}</div>
      </div>
      <label class="control-label col-sm-2">水费余额</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.waterBalance}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">物业费</label>
      <div class="col-sm-3">
        <div class="form-control info-text">{{contract.manageFee}}</div>
      </div>
    </div>
    <div class="form-group" ng-if="contract.activityId">
      <label class="control-label col-sm-2 col-sm-offset-1">优惠活动</label>
      <div class="col-sm-8">
        <div class="form-control info-text">{{contract.feeDesc}}</div>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1">合同备注</label>
      <div class="col-sm-8">
        <textarea class="form-control" rows="3" ng-readonly="true">{{contract.contractPicture}}</textarea>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2 col-sm-offset-1"
             ng-if="contract.preContractUuid">原合同号</label>
      <div class="col-sm-3">
        <div class="form-control info-text"
             ng-if="contract.preContractUuid">{{contract.preContractUuid}}</div>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-4"></div>
      <div class="col-sm-4 text-center">
        <button class="btn btn-warning" ng-click="printContract()">合同打印</button>
      </div>
    </div>
  </ng-form>
</div>